home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Xconq 7.0d37 / lib / friedrich.g < prev    next >
Text File  |  1995-05-04  |  5KB  |  217 lines

  1. (game-module "friedrich"
  2.   ;; This is not a standalone game, has only a test setup defined.
  3.   (blurb "Type definitions for games set during the Seven Years War")
  4.   (variants (world-size (45 30 1000)))
  5. )
  6.  
  7. (set see-all true) ; for debugging
  8.  
  9. (unit-type army (image-name "soldiers"))
  10. (unit-type general (image-name "flag"))
  11. (unit-type marshal (image-name "flag"))
  12. (unit-type prince (image-name "flag"))
  13. (unit-type king (image-name "crown"))
  14. (unit-type depot (image-name "walltown"))
  15. (unit-type town (image-name "town20"))
  16. (unit-type fortress (image-name "fortress"))
  17.  
  18. (material-type supplies (help "generic supplies"))
  19.  
  20. (terrain-type sea (color "sky blue") (char "."))
  21. (terrain-type countryside (color "green") (char "+") (image-name "countryside"))
  22. (terrain-type swamp (color "yellow green") (char "="))
  23. (terrain-type forest (color "forest green") (char "%")) ; no longer used?
  24. (terrain-type hills (color "khaki") (char ">")) ; no longer used
  25. (terrain-type mountains (color "sienna") (char "^"))
  26. (terrain-type river (color "blue") (subtype border))
  27. (terrain-type barrier (color "sienna") (image-name "mountains") (subtype border))
  28. (terrain-type pass (color "gray") (image-name "road") (subtype connection))
  29.  
  30. (define land (countryside swamp forest hills mountains))
  31. (define cell-t* (sea countryside swamp forest hills mountains))
  32. (define leader (general marshal prince king))
  33. (define bases (depot town fortress))
  34.  
  35. ;;; Static relationships.
  36.  
  37. (table vanishes-on
  38.   ;; No navy in this game.
  39.   (u* sea true)
  40.   )
  41.  
  42. ;;; Armies carry leaders around and are propelled by them.
  43.  
  44. (add army capacity 1)
  45. (add bases capacity 10)
  46.  
  47. (table unit-size-as-occupant
  48.   (u* u* 100)  ; disables capacity by default
  49.   (army bases 1)
  50.   (leader army 1)  ; army can only have one commander
  51.   (leader bases 0)
  52.   )
  53.  
  54. ;;; Leaders can carry each other around, higher ranks "carrying" lower.
  55.  
  56. (table unit-capacity-x
  57.   (king (general marshal prince) 4)
  58.   (prince (general marshal) 3)
  59.   (marshal (general) 2)
  60.   )
  61.  
  62. (table unit-size-in-terrain
  63.   (u* t* 0)
  64.   ;; (need to limit armies?)
  65.   )
  66.  
  67. (table unit-storage-x
  68.   (army supplies 100)
  69.   (bases supplies 1000)
  70.   )
  71.  
  72. ;;; Action parameters.
  73.  
  74. (add army acp-per-turn 1)
  75. (add leader acp-per-turn 6)
  76. (add bases acp-per-turn 0)
  77.  
  78. (table acp-occupant-effect
  79.   ;; Leaders "get the lead out", accelerate the army.
  80.   (leader army 600)
  81.   )
  82.  
  83. ;;; Movement parameters.
  84.  
  85. (table mp-to-enter-terrain
  86.   (u* sea 99)
  87.   ;; Crossing rivers is hard for armies.
  88.   (army river 1)
  89.   (army barrier 99)
  90.   (leader barrier 99)
  91. )
  92.  
  93. (table mp-to-traverse
  94.   (army pass 1 #|2|#)
  95.   )
  96.  
  97. (add army free-mp 1)
  98.  
  99. ;; 5 s supply-line
  100.  
  101. ;;; Construction parameters.
  102.  
  103. (add depot cp 10)
  104.  
  105. (table acp-to-create (army depot 1))
  106.  
  107. (table acp-to-build (army depot 1))
  108.  
  109. (table cp-per-build (army depot 1))
  110.  
  111. ;;; Combat parameters.
  112.  
  113. (add army hp-max 40)
  114.  
  115. ;(table acp-to-attack
  116. ;  )
  117.  
  118. (table hit-chance
  119.   (army army 50)
  120.   (army leader 50)
  121.   )
  122.  
  123. (table damage
  124.   (army army 1)
  125.   (army leader 1)
  126.   )
  127.  
  128. ;;; Leaders should be able to retreat from hits.
  129.  
  130. (table acp-to-capture
  131.   (army army 1)
  132.   (army leader 1)
  133.   (army bases 1)
  134.   )
  135.  
  136. (table capture-chance
  137.   (army army 25)
  138.   (army leader 100)
  139.   (army bases 100)
  140.   )
  141.  
  142. ;;; Garrisons prevent immediate capture.
  143.  
  144. (table protection
  145.   (army fortress 10)
  146.   )
  147.  
  148. ;;; Need a surrender chance for depots vs fortresses.
  149.  
  150. ;;; Scoring.
  151.  
  152. (add u* point-value 0)
  153. (add fortress point-value 1)
  154.  
  155. ;;; Seasons.
  156.  
  157. (world (year-length 24))
  158.  
  159. (set calendar '(usual "month" 1 2))
  160.  
  161. (set season-names
  162.   ((0 6 "winter") (7 11 "spring") (12 17 "summer") (18 23 "autumn")))
  163.  
  164. ;;; Random generation; should be for testing only.
  165.  
  166. (add cell-t* alt-percentile-min (  0  70  30  20  90  95))
  167. (add cell-t* alt-percentile-max ( 20  90  31  90  95 100))
  168. (add cell-t* wet-percentile-min (  0  50  50   0   0   0))
  169. (add cell-t* wet-percentile-max (100 100 100 100 100 100))
  170.  
  171. (set edge-terrain mountains)
  172.  
  173. (add u* start-with 1)  ; one of everything
  174.  
  175. (table favored-terrain
  176.   (u* t* 0)
  177.   (u* countryside 100)
  178.   )
  179.  
  180. ;;; Always max out at a 9-month campaign season.
  181.  
  182. (set last-turn 18)
  183.  
  184. ;;; (this is not strictly necessary, since actual sides should always be used)
  185.  
  186. (set side-library '(
  187.   ((name "Austria") (adjective "Austrian"))
  188.   ((name "Prussia") (adjective "Prussian"))
  189.   ((name "France") (adjective "French"))
  190.   ((name "Russia") (adjective "Russian"))
  191.   ((name "Swabia") (adjective "Swabian"))
  192.   ((name "Hannover") (adjective "Hannoverian"))
  193.   ((name "Saxony") (adjective "Saxon"))
  194.   ((name "Sweden") (adjective "Swedish"))
  195.   ))
  196.  
  197. (game-module (notes (
  198.   "This is a game about the Seven Years War in central Europe.  The number of unit types"
  199.   "is small, and there are only a few special characteristics.  The game"
  200.   "is basically one of maneuvering for position, since combat was mostly"
  201.   "ineffective."
  202.   ""
  203.   "Map scale is 15 miles/cell, time is 2 weeks/turn."
  204.   ""
  205.   )))
  206.  
  207. (game-module (design-notes (
  208.   "A number of items remain to be developed:"
  209.   ""
  210.   "Disable free moves and make combat cost high, to simulate the mutual"
  211.   "consent to combat."
  212.   ""
  213.   "Supply paths (about 4-5 cells)."
  214.   ""
  215.   "River effect on combat."
  216.   )))
  217.